package com.woniu.darryringmall.ucenter.controller;

import com.woniu.darryringmall.front.entity.Address;
import com.woniu.darryringmall.front.entity.Order;
import com.woniu.darryringmall.front.service.AddressService;
import com.woniu.darryringmall.front.service.OrderService;
import com.woniu.darryringmall.front.service.UserService;
import com.woniu.darryringmall.front.service.ViewOrderService;
import com.woniu.darryringmall.front.service.impl.OrderItemsServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Slf4j
@Controller("ucenterOrderItem")
@RequestMapping("ucenter/orderitem")
public class OrderItemController {
    @Autowired
    private ViewOrderService viewOrderService;

    @Autowired
    private OrderService orderService;

    @Autowired
    private AddressService addressService;

    @GetMapping("list")
    public String list (Model model){
        model.addAttribute("vorder",orderService.getById(1));
        model.addAttribute("details",viewOrderService.getByOrderId(1));
        System.out.println(viewOrderService.getByOrderId(1));
        System.out.println(8888888);
        return "member_order_detail";
    }
}
